<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>首页</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body{
            background: aliceblue;
            /*background-image: url("WEB-INF/JSP/mjxy.jpg");*/
        }
        a {
            text-decoration: none;
            color: black;
            font-size: 18px;

        }

        h3 {
            width: 180px;
            height: 38px;
            margin: 100px auto;
            text-align: center;
            line-height: 38px;

            border-radius: 5px;
        }

        .dv1{
            width: 280px;
            height: 240px;
            margin: 100px auto;
            text-align: center;
            line-height: 38px;

            border-radius: 5px;
        }
        .dv2{
            width: 90px;
            height: 20px;
        }
    </style>
    <script>
        function User() {
            let username =document.getElementById("username").value;
            let password =document.getElementById("password").value;
            if (username == "admin" && password == "123456"){
                window.location.href  = "${pageContext.request.contextPath}/book/list";
                return
            }
            alert("用户名或密码错误！");
        }
    </script>
</head>
<body>
   <h3>
       <p>进入书籍管理</p>
   </h3>
    <div class="dv1">
        <div class="dv2"></div>
        <h4>登录</h4>
        <label>账号：</label>
        <input type="text" id="username" value="admin" placeholder="请输入用户名" ><br>
        <div class="dv2"></div>
        <label>密码：</label>
        <input type="password" id="password" value="123456" placeholder="请输入密码" ><br>
        <div class="dv2"></div>
        <button onclick="User()" class="btn btn-success"  >登入  </button>
    </div>

</body>
</html>
